package com.tsd.jxc.sale.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tsd.core.utils.HlpUtils;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @ClassName: JxcSaleContractVo
 * @Description: TODO
 * @Author: Hillpool
 * @Date: 2023/3/7 15:48
 * @Version: 1.0
 */
public class JxcSaleContractVo {

    private String contract_code;

    private String client_name;

    private String client_address;

    private String client_linker_name;

    private String client_linker_phone;

    @JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
    private Date delivery_date;

    private String include_tax_str;

    private BigDecimal total_amount;

    @JsonFormat(pattern = "yyyy-MM-dd", locale = "zh", timezone = "GMT+8")
    private Date the_date;

    private List<JxcSaleContractDetailVo> detail_list;

    public String getContract_code() {
        return contract_code;
    }

    public void setContract_code(String contract_code) {
        this.contract_code = contract_code;
    }

    public String getClient_name() {
        return client_name;
    }

    public void setClient_name(String client_name) {
        this.client_name = client_name;
    }

    public String getClient_address() {
        return client_address;
    }

    public void setClient_address(String client_address) {
        this.client_address = client_address;
    }

    public String getClient_linker_name() {
        return client_linker_name;
    }

    public void setClient_linker_name(String client_linker_name) {
        this.client_linker_name = client_linker_name;
    }

    public String getClient_linker_phone() {
        return client_linker_phone;
    }

    public void setClient_linker_phone(String client_linker_phone) {
        this.client_linker_phone = client_linker_phone;
    }

    public Date getDelivery_date() {
        return delivery_date;
    }

    public void setDelivery_date(Date delivery_date) {
        this.delivery_date = delivery_date;
    }

    public String getInclude_tax_str() {
        return include_tax_str;
    }

    public void setInclude_tax_str(String include_tax_str) {
        this.include_tax_str = include_tax_str;
    }

    public BigDecimal getTotal_amount() {
        return total_amount;
    }

    public void setTotal_amount(BigDecimal total_amount) {
        this.total_amount = total_amount;
    }

    public Date getThe_date() {
        return the_date;
    }

    public void setThe_date(Date the_date) {
        this.the_date = the_date;
    }

    public List<JxcSaleContractDetailVo> getDetail_list() {
        return detail_list;
    }

    public void setDetail_list(List<JxcSaleContractDetailVo> detail_list) {
        this.detail_list = detail_list;
    }

    public Long getDelivery_date_long() {
        if (!HlpUtils.isEmpty(this.getDelivery_date())) {
            return this.getDelivery_date().getTime();
        }
        return null;
    }

    public Long getThe_date_long() {
        if (!HlpUtils.isEmpty(this.getThe_date())) {
            return this.getThe_date().getTime();
        }
        return null;
    }
}
